package com.meisupic.copyright.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

@Data
public class VipMemberVo implements Serializable {

  private Long id;

  private Long memberCategoryId;

  private String memberCategoryName;

  private String leftAmount;

  private String total;

  private Long userId;

  private BigDecimal price;

  @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
  private Date expiryDate;

  public String getTotal() {
    if ("-1".equals(total)) {
      return "不限制";
    }
    return total;
  }

  public String getLeftAmount() {
    if("-1".equals(leftAmount)){
      return "不限制";
    }
    return leftAmount;
  }
}
